package com.park.service.impl.news;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.park.client.model.news.NewsModel;
import com.park.client.service.news.NewsService;
import com.park.client.vo.NewsVo;
import com.park.dao.news.NewsMapper;
import com.park.service.impl.base.BaseServiceImpl;

@Service("newsService")
public class NewsServiceImpl extends BaseServiceImpl<NewsModel> implements NewsService {
	
	@Autowired
	private NewsMapper newsMapper;

	@Override
	public boolean insert(NewsModel record) {
		return newsMapper.insert(record) == 1;
	}
	@Override
	public boolean deleteByPrimaryKey(Long id) {
		return newsMapper.deleteByPrimaryKey(id)==1;
	}
	@Override
	public boolean insertSelective(NewsModel record) {
		return newsMapper.insertSelective(record)==1;
	}
	@Override
	public NewsModel selectByPrimaryKey(Long id) {
		return newsMapper.selectByPrimaryKey(id);
	}
	@Override
	public boolean updateByPrimaryKeySelective(NewsModel record) {
		return newsMapper.updateByPrimaryKeySelective(record)==1;
	}
	@Override
	public boolean updateByPrimaryKey(NewsModel record) {
		return newsMapper.updateByPrimaryKey(record) ==1 ;
	}
	@Override
	public List<NewsVo> selectHotNews() {
		return newsMapper.selectHotNews();
	}
	@Override
	public List<NewsModel> selectPagination(NewsModel t) {
		return newsMapper.selectPagination(t);
	}
	@Override
	public Integer selectTotal(NewsModel t) {
		return newsMapper.selectTotal(t);
	}
	

}
